package xdb;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;

public class Trace {
    public static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    private static final Logger logger = LoggerFactory.getLogger("XDB");

    public final static void debug(Object message) {
        logger.debug(message.toString());
    }

    public final static void info(Object message) {
        logger.info(message.toString());
    }

    public final static void warn(Object message) {
        logger.warn(message.toString());
    }

    public final static void error(Object message) {
        logger.error(message.toString());
    }

    public final static void fatal(Object message) {
        logger.error(message.toString());
    }

    public final static void error(Object message, Throwable e) {
        logger.error(message.toString(), e);
    }

    public final static void fatal(Object message, Throwable e) {
        logger.error(message.toString(), e);
    }

    public static boolean isDebugEnabled() {
        return logger.isDebugEnabled();
    }

}
